package com.tuanzi.loan.web.lazy.collaborate;

import com.tuanzi.loan.business.service.family.StatLargePageDetailService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.largeamount.LoanStatLargePageDetailRequest;
import com.tuanzi.loan.vo.response.family.largeamount.LoanStatLargePageDetailResponse;
import org.springframework.data.domain.Page;

/**
 * User: liangZongXi
 * Create time: 16:17 2019/8/21
 * Description:
 */
public class LargePartnerStatListBeanLazyDataModel extends BaseLazyDataModel<LoanStatLargePageDetailRequest, LoanStatLargePageDetailResponse> {
    private static final long serialVersionUID = 6449601351904501284L;

    private StatLargePageDetailService statLargePageDetailService = SpringContextHolder.getBean(StatLargePageDetailService.class);

    public LargePartnerStatListBeanLazyDataModel(LoanStatLargePageDetailRequest loanStatLargePageDetailRequest) {
        super(loanStatLargePageDetailRequest);
    }

    @Override
    protected Page<LoanStatLargePageDetailResponse> doLoad(PageSearcher<LoanStatLargePageDetailRequest> pageSearcher) {
        return statLargePageDetailService.listChannelNdIn(pageSearcher);
    }
}
